package com.ourteam.education.domain;
/**
 * Template Name : DTO数据对象
 * Template Version : 1
 * Template Last Modfiy Date : Fri Nov 30 16:49:33 CST 2018
 * Auto Generate Date : 2019-09-22 15:15:18
  * Warning ! This file will be overwrite when regenerate !
  * 
 */

import java.util.Map;
import java.util.HashMap;
import org.apache.commons.lang.ArrayUtils;
import org.apache.commons.beanutils.BeanMap;
import net.dao.IDataPopulateCallback;


public class CampusBean implements java.io.Serializable {

        
	private static Map<String,String> mappedDaoFields = new HashMap<String,String>();
    
	private com.ourteam.education.dao.Campus campus;

	protected BeanMap getBeanMap(){
	
		return new BeanMap(campus);
	}
	
	static{
				
												
		mappedDaoFields.put("id",com.ourteam.education.dao.ICampusDAO.Id);
		
																																										
				
																
		mappedDaoFields.put("campusName",com.ourteam.education.dao.ICampusDAO.CampusName);
		
																																						
				
																				
		mappedDaoFields.put("campusTel1",com.ourteam.education.dao.ICampusDAO.CampusTel1);
		
																																		
				
																								
		mappedDaoFields.put("campusTel2",com.ourteam.education.dao.ICampusDAO.CampusTel2);
		
																														
				
																												
		mappedDaoFields.put("campusAddress",com.ourteam.education.dao.ICampusDAO.CampusAddress);
		
																										
				
																																
		mappedDaoFields.put("campusType",com.ourteam.education.dao.ICampusDAO.CampusType);
		
																						
				
																																				
		mappedDaoFields.put("sortIndex",com.ourteam.education.dao.ICampusDAO.SortIndex);
		
																		
				
																																								
		mappedDaoFields.put("status",com.ourteam.education.dao.ICampusDAO.Status);
		
														
				
																																												
		mappedDaoFields.put("remarks",com.ourteam.education.dao.ICampusDAO.Remarks);
		
										
				
				
	}
	
	public static String getMappedDAOField(String aAttrName){
		return mappedDaoFields.get(aAttrName);
	}
	
	
	public CampusBean() {
		super();
	    		
		this.campus = new com.ourteam.education.dao.Campus();
                
	}
	
		
	public CampusBean(com.ourteam.education.dao.Campus campus) {
		super();
	
		this.campus = campus;
		
	}
		
		
		
    	
	public com.ourteam.education.dao.Campus convertToCampus(){
		return this.campus;
	}
	
	public com.ourteam.education.dao.Campus convertTo(){
		return this.campus;
	}
	
			
		
			
			
		
	/**
	 * Get id
	 * 
	 * @return long
	 */
	public long getId(){
		return (long) this.campus.getId();
	}
	
	/**
	 * Set id
	 * 
	 * @parameter long
	 */
	public void setId(long id){
		
		this.campus.setId(id);
	}
		
																					
		
		
					
			
		
	/**
	 * Get campusName
	 * 
	 * @return String
	 */
	public String getCampusName(){
		return (String) this.campus.getCampusName();
	}
	
	/**
	 * Set campusName
	 * 
	 * @parameter String
	 */
	public void setCampusName(String campusName){
		
		this.campus.setCampusName(campusName);
	}
		
																			
		
		
							
			
		
	/**
	 * Get campusTel1
	 * 
	 * @return String
	 */
	public String getCampusTel1(){
		return (String) this.campus.getCampusTel1();
	}
	
	/**
	 * Set campusTel1
	 * 
	 * @parameter String
	 */
	public void setCampusTel1(String campusTel1){
		
		this.campus.setCampusTel1(campusTel1);
	}
		
																	
		
		
									
			
		
	/**
	 * Get campusTel2
	 * 
	 * @return String
	 */
	public String getCampusTel2(){
		return (String) this.campus.getCampusTel2();
	}
	
	/**
	 * Set campusTel2
	 * 
	 * @parameter String
	 */
	public void setCampusTel2(String campusTel2){
		
		this.campus.setCampusTel2(campusTel2);
	}
		
															
		
		
											
			
		
	/**
	 * Get campusAddress
	 * 
	 * @return String
	 */
	public String getCampusAddress(){
		return (String) this.campus.getCampusAddress();
	}
	
	/**
	 * Set campusAddress
	 * 
	 * @parameter String
	 */
	public void setCampusAddress(String campusAddress){
		
		this.campus.setCampusAddress(campusAddress);
	}
		
													
		
		
													
			
		
	/**
	 * Get campusType
	 * 
	 * @return String
	 */
	public String getCampusType(){
		return (String) this.campus.getCampusType();
	}
	
	/**
	 * Set campusType
	 * 
	 * @parameter String
	 */
	public void setCampusType(String campusType){
		
		this.campus.setCampusType(campusType);
	}
		
											
		
		
															
			
		
	/**
	 * Get sortIndex
	 * 
	 * @return long
	 */
	public long getSortIndex(){
		return (long) this.campus.getSortIndex();
	}
	
	/**
	 * Set sortIndex
	 * 
	 * @parameter long
	 */
	public void setSortIndex(long sortIndex){
		
		this.campus.setSortIndex(sortIndex);
	}
		
									
		
		
																	
			
		
	/**
	 * Get status
	 * 
	 * @return String
	 */
	public String getStatus(){
		return (String) this.campus.getStatus();
	}
	
	/**
	 * Set status
	 * 
	 * @parameter String
	 */
	public void setStatus(String status){
		
		this.campus.setStatus(status);
	}
		
							
		
		
																			
			
		
	/**
	 * Get remarks
	 * 
	 * @return String
	 */
	public String getRemarks(){
		return (String) this.campus.getRemarks();
	}
	
	/**
	 * Set remarks
	 * 
	 * @parameter String
	 */
	public void setRemarks(String remarks){
		
		this.campus.setRemarks(remarks);
	}
		
					
		
			
			
			
			
			
			
			
			
			
			
			
	
	public int hashCode() {
   		return org.apache.commons.lang.builder.HashCodeBuilder.reflectionHashCode(this);
 	}
	
		
	public boolean equals(Object obj) {
		if (obj == null) {
            return false;
        } // end if

        if ((obj instanceof CampusBean) == false) {
            return false;
        } // end if

        CampusBean other = (CampusBean) obj;
        
        boolean isEqual = false;
        
                
        com.ourteam.education.dao.Campus tempCampus = other.convertToCampus();
        
        if(tempCampus == null || this.campus == null){
        	isEqual = false;
        }
        else if(tempCampus == this.campus || tempCampus.equals(this.campus) ){
        	isEqual = true;
        }
        else{
        	isEqual = false;
        }
        
        return isEqual;
	}
	
	
	public static CampusBean[] toArray(com.ourteam.education.dao.Campus[] aCampuss){
		
		return toArray(aCampuss,null);
	}
	
	public static CampusBean[] toArray(com.ourteam.education.dao.Campus[] aCampuss , IDataPopulateCallback aCallBack){
		 
		 if(ArrayUtils.isEmpty(aCampuss)){
		 	return new CampusBean[0];
		 }
		 
		 int length = aCampuss.length;
		 
		 CampusBean[] beans = new CampusBean[length];
		  
		 for (int i = 0; i < length; i++) {
			beans[i] = new CampusBean(aCampuss[i]);
			if(aCallBack != null){
			    aCallBack.populate(beans[i],new Object[]{aCampuss[i]});
			}
		 }
		 
		 return beans;
	 }
	 
	 	 
}